#!/usr/bin/env python

from Milk import Milk#,dottedDictToList
milk = Milk()


def printSmartList(list_id):
    for lst in milk.rtm.tasks.getList(list_id=list_id).tasks.list:
        if str(type(lst.taskseries)) == "<class 'rtm.dottedDict'>":
            tseries = [lst.taskseries]
            #print dottedDictToList(lst.taskseries)
        elif type(lst.taskseries) == list:
            tseries = lst.taskseries
            #print dottedDictToList(tseries)

        for task in tseries:
            print task.name


id = milk.getListID("Computer")
milk.printFormattedTaskInfo(id)
